#ifndef SWINPUT_H
#define SWINPUT_H

#include <vector>
#include "simulator.h"

using namespace std;

class SWINPUT_STATE : public STATE
{
public:
	int state;
};

class SWINPUT : public SIMULATOR
{
public:

	double horizon;
	vector<string> actionNames;
	int numStateVariables;
	vector<string> stateNames;
	int numObsVariables;
	vector<string> obsNames;
	int* weightedObsVars;

	int convertToFlatObsState(vector<int> input);

    SWINPUT();

    virtual STATE* Copy(const STATE& state) const;
    virtual void Validate(const STATE& state) const;
    virtual STATE* CreateStartState() const;
    virtual void FreeState(STATE* state) const;
    virtual bool Step(STATE& state, int action,
        int& observation, double& reward) const;

//    void GenerateLegal(const STATE& state, const HISTORY& history,
//        std::vector<int>& legal, const STATUS& status) const;
//    void GeneratePreferred(const STATE& state, const HISTORY& history,
//        std::vector<int>& legal, const STATUS& status) const;
//    virtual bool LocalMove(STATE& state, const HISTORY& history,
//        int stepObservation, const STATUS& status) const;

    virtual void DisplayBeliefs(const BELIEF_STATE& beliefState,
        std::ostream& ostr) const;
    virtual void DisplayState(const STATE& state, std::ostream& ostr) const;
    virtual void DisplayObservation(const STATE& state, int observation, std::ostream& ostr) const;
    virtual void DisplayAction(int action, std::ostream& ostr) const;

protected:


    void InitGeneral();
    //int GetObservation(const SWROCKSAMPLE_STATE& rockstate, int rock) const;
    //int SelectTarget(const SWROCKSAMPLE_STATE& rockstate) const;

private:

    mutable MEMORY_POOL<SWINPUT_STATE> MemoryPool;
};

#endif
